home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / satellit / vstsrc / vstprop.h < prev    next >
C/C++ Source or Header  |  1995-01-23  |  9KB  |  197 lines

  1. #ifndef _VSTPROP_H
  2. #define _VSTPROP_H
  3. /*
  4.  * %W% %E% %U%  [EXTREL_1.2]
  5.  *
  6.  * VersaTrack orbit calculations are based on those that appear in Dr. Manfred
  7.  * Bester's sattrack program (the Unix(tm) versions 1 and 2).
  8.  *
  9.  * The data from which the maps where generated come from "xsat", an
  10.  * X-Windows program by David A. Curry (N9MSW).
  11.  *
  12.  * Site coordinates come from various sources, including a couple of
  13.  * World Almanacs, and also from both of the programs mentioned above.
  14.  *
  15.  * The following are authors' applicable copyright notices:
  16.  *
  17.  *                                                                               
  18.  * Copyright (c) 1992, 1993, 1994 Manfred Bester. All Rights Reserved.        
  19.  *                                                                           
  20.  * Permission to use, copy, modify, and distribute this software and its      
  21.  * documentation for educational, research and non-profit purposes, without   
  22.  * fee, and without a written agreement is hereby granted, provided that the  
  23.  * above copyright notice and the following three paragraphs appear in all    
  24.  * copies.                                                                    
  25.  *                                                                              
  26.  * Permission to incorporate this software into commercial products may be    
  27.  * obtained from the author, Dr. Manfred Bester, 1636 M. L. King Jr. Way,     
  28.  * Berkeley, CA 94709, USA.                                                   
  29.  *                                                                             
  30.  * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,  
  31.  * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF    
  32.  * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED   
  33.  * OF THE POSSIBILITY OF SUCH DAMAGE.                                         
  34.  *                                                                             
  35.  * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT       
  36.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A    
  37.  * PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"       
  38.  * BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,  
  39.  * UPDATES, ENHANCEMENTS, OR MODIFICATIONS.                                   
  40.  *                                                                             
  41.  *                                                                             
  42.  * Copyright 1992 by David A. Curry                                            
  43.  *                                                                             
  44.  * Permission to use, copy, modify, distribute, and sell this software and its 
  45.  * documentation for any purpose is hereby granted without fee, provided that  
  46.  * the above copyright notice appear in all copies and that both that copyright
  47.  * notice and this permission notice appear in supporting documentation.  The  
  48.  * author makes no representations about the suitability of this software for  
  49.  * any purpose.  It is provided "as is" without express or implied warranty.   
  50.  *                                                                             
  51.  * David A. Curry, N9MSW                                                       
  52.  * Purdue University                                                           
  53.  * Engineering Computer Network                                                
  54.  * 1285 Electrical Engineering Building                                        
  55.  * West Lafayette, IN 47907                                                    
  56.  * davy@ecn.purdue.edu                                                         
  57.  *                                                                             
  58.  * VersaTrack Copyright (c) 1993, 1994 Siamack Navabpour. All Rights Reserved.
  59.  *
  60.  * Permission is hereby granted to copy, modify and distribute VersaTrack
  61.  * in whole, or in part, for educational, non-profit and non-commercial use
  62.  * only, free of charge or obligation, and without agreement, provided that
  63.  * all copyrights and restrictions noted herein are observed and followed, and
  64.  * additionally, that this and all other copyright notices listed herein
  65.  * appear unaltered in all copies and in all derived work.
  66.  *
  67.  * This notice shall not in any way void or supersede any of the other authors
  68.  * rights or privileges.
  69.  *
  70.  * VersaTrack IS PRESENTED FREE AND "AS IS", WITHOUT ANY WARRANTY OR SUPPORT.
  71.  * YOU USE IT AT YOUR OWN RISK. The author(s) shall not be liable for any
  72.  * direct, indirect, incidental, or consequential damage, loss of profits or
  73.  * other tangible or intangible losses or benefits, arising out of or related
  74.  * to its use. VersaTrack carries no warranty, explicit or implied, including
  75.  * but not limited to those of merchantablity and fitness for a particular
  76.  * purpose.
  77.  *
  78.  * Siamack Navabpour, 12342 Hunter's Chase Dr. Apt. 2114, Austin, TX 78729.
  79.  * sia@bga.com or sia@realtime.com.
  80.  */
  81.  
  82.  
  83. #define AE       1.0
  84. #define AE2      (AE * AE)
  85. #define AE3      (AE2 * AE)
  86. #define AE4      (AE2 * AE2)
  87.  
  88. #define KE       0.0743669161          /* (KEPLER/EARTHRADIUS)^3/2 *
  89.                                           TWOPI/MPD */
  90. #define Q0       120.0
  91. #define S0       78.0
  92.  
  93. #define Q0MS0T4  (pow(((Q0 - S0) * AE / EARTHRADIUS),4.0))
  94. #define S        (AE * (1.0 + S0 / EARTHRADIUS))
  95.  
  96. #define JJ2      1.082616e-3
  97. #define JJ3      -0.253881e-5
  98. #define JJ4      -1.655970e-6
  99.  
  100. #define CK2      (0.5 * JJ2 * AE2)      /* WGS-72 physical and    */
  101. #define CK4      (-0.375 * JJ4 * AE4)   /* geopotential constants */
  102.  
  103. #define A30CK2   (-(JJ3) / CK2 * AE3)
  104.  
  105. #define ZNS      1.19459e-5
  106. #define C1SS     2.9864797e-6
  107. #define ZES      0.01675
  108. #define ZNL      1.5835218e-4
  109. #define C1L      4.7968065e-7
  110. #define ZEL      0.05490
  111.  
  112. #define cosIS    0.91744867
  113. #define sinIS    0.39785416
  114. #define cosGS    0.1945905
  115. #define sinGS   -0.98088458
  116. #define cosHZ    1.0
  117. #define sinHS    0.0
  118.  
  119. #define Q22      1.7891679e-6
  120. #define Q31      2.1460748e-6
  121. #define Q33      2.2123015e-7
  122.  
  123. #define G22      5.7686396
  124. #define G32      0.95240898
  125. #define G44      1.8014998
  126. #define G52      1.0508330
  127. #define G54      4.4108898
  128.  
  129. #define ROOT22   1.7891679e-6
  130. #define ROOT32   3.7393792e-7
  131. #define ROOT44   7.3636953e-9
  132. #define ROOT52   1.1428639e-7
  133. #define ROOT54   2.1765803e-9
  134.  
  135. #define THDT     4.3752691e-3
  136.  
  137.  
  138. typedef struct tag_satProp {
  139. #ifdef LATER
  140.     double a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
  141.     double bfact, capU, clc0, capEpAP;
  142.     double cosG, cosGL, cosH, cosHL, cosI, cosIL, cosIQ;
  143.     double cosQ2, cosTEM, cosU, cos2U, gAM, kep1;
  144.     double c2, coef1, delta0, delta1, delta12, delta13;
  145.     double delta2, delta3, delA, delAM, delArgPer, delE;
  146.     double delInc, delMeanAn, delMeanMot, delL, delR, delRDot, delRFDot;
  147.     double delRaan, delU, eE2, e3, eL2, eM, eQ, etaSQ;
  148.     double dAlp, dBet, dLS, d2, d3, d4, eccSQ, eccCB, eSinE, eCosE;
  149.     double g200, g201, g211, g300, g310, g322, g410, g422, g520, g521, g532, g533;
  150.     double lngGr, meanAn, meanMotCof, meanMotDot, meanMotDF, meanMotP;
  151.     double piDot, preEpoch, pE, pGH, pH, pInc, pInvSQ, pL, psiSQ;
  152.     double saveT, stepp, stepn, step2;
  153.     double sinG, sinGL, sinH, sinHL, sinI, sinI2, sinIL, sinIQ;
  154.     double meanAnp, sinMeanAnp, sinMeanAn0, sinTEM, sinU, sin2U, sinZF;
  155.     double sma0, sma1, smallR, smallU;
  156.     double d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433;
  157.     double fASX2, fASX4, fASX6, fF2, fF3, fT;
  158.     double f220, f221, f311, f321, f322, f330, f441, f442, f522, f523, f542, f543;
  159.     double s1, s2, s3, s5, s6, s7;
  160.     double sE, sE2, sE3, sEL, sES, sGH, sGH2, sGH3, sGH4, sGHL, sGHS;
  161.     double SH, SH2, SH3, SHL;
  162.     double sHS, sI, sI2, sI3, sIL, sIS, sL, sL2, sL3, sL4, sLL, sLS;
  163.     double sS, sSE, sSG, sSH, sSI, sSL;
  164.     double t2Cof, t3Cof, t4Cof, t5Cof;
  165.     double upd1, upd2, upd3, upd4, upd5, upd6;
  166.     double xfact, xlamo, xNodeS, x2LI, x2OMI, xGH2, xGH3, xGH4, xH2, xH3;
  167.     double xI2, I3, xL2, xL3, xL4, xLCof, xLDot, xLL, xLI, xLLDot, xLS, xMAM;
  168.     double x1, x2, x3, x4, x5, x6, x7, x8;
  169.     double zE, zF, zM, zMO, zMOL, zMOS, zN, zX, zY;
  170.     double z1, z2, z3, z11, z12, z13, z21, z22, z23, z31, z32, z33;
  171. #endif /* LATER */
  172.  
  173.     double argPer, argPer0, argPerCof, argPerDot, argPerDF;
  174.     double axN, ayN, ayNL;
  175.     double beta, betaL, beta0, beta02, beta03, bStar;
  176.     double clc1, clc2, clc3;
  177.     double cosEpAP, cosInc, cos2Inc, cos4Inc;
  178.     double c1, c1SQ, c3, c4, c5, coef0;
  179.     double decRate, decRateDot;
  180.     double ecc0, epoch0, eccEta, eL2, eta;
  181.     double inc, inc0, incK, kep2, kep3, kep4, kep5, lngGr, qmst4;
  182.     double meanAn0, meanAnCof, meanAnDot, meanAnDF;
  183.     double meanMot, meanMot0, meanMotDeep;
  184.     double raan, raan0, raanCof, raanK, raanDot, raanDF;
  185.     double rDot, rk, rkDot, rfDot, rfkDot;
  186.     double sinEpAP, sinInc, sStar, sma0Deep, smallA, smallE;
  187.     double tFP, tSQ, tCB, tQD, tQN, uk;
  188.     double xi, x1m1th, x1m5th, x3thm1, x7thm1, xL, xLT;
  189.         
  190.     double trueAnomalyX, curRaanX, curArgPerigeeX, curMotionX, curArgNodeX;
  191.     double perigeeHeight, semiMajorAxis;
  192.     int    deepSpaceFlag, truncFlag;
  193.     BOOL   satCrashFlag;
  194. } satprop_t;
  195.  
  196. #endif /* _VSTPROP_H */
  197.